<?php 

require('db_sessions.inc.php');
 ?>


<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>DB session test</title>
</head>
<body>
	<?php 

		if(empty($_SESSION)){

			$_SESSION['blash']='lijian';
			$_SESSION['this']='hua dong jiao tong da xue ligongxueyuan';
			$_SESSION['that']='you are blue';
		}else{
				echo '<p> session exit data :<pre>'.  print_r($_SESSION,1).'
					
				</pre></p>';
		}
		if(isset($_GET['logout'])){

			session_destroy();
			echo '<p> session destroyed.</p>';
		}else{

			echo '<a href="session.php?logout=true">LogOut</a>';
		}
		echo '<p> session data:<pre>
			'.print_r($_SESSION,1).'
		</pre></p>';
		echo '</body>
</html>';
session_write_close();
	 ?>
	
